export def with-proxy [blk: block] {
    let host = $'((open /etc/resolv.conf | lines | parse "nameserver {host}").0.host):7890'
    load-env {
        https_proxy: $host,
        http_proxy: $host,
    }
    do $blk
}

export def command-exist [cmd] {
    not (which $cmd | is-empty)
}

export alias ll = ls -l
export alias vim = nvim

